Skip to content

refactor(forge-stream): document storage type for each DataKey variant#299

Merged
Austinaminu2 merged 1 commit intoAustinaminu2:mainfrom
zeekman:refactor/245-stream-datakey-storage-docs
Mar 30, 2026
Merged

refactor(forge-stream): document storage type for each DataKey variant#299
Austinaminu2 merged 1 commit intoAustinaminu2:mainfrom
zeekman:refactor/245-stream-datakey-storage-docs

Conversation

@zeekman
Copy link
Copy Markdown
Contributor

@zeekman zeekman commented Mar 30, 2026

What does this PR do?

forge-stream's DataKey variants had no documentation indicating which
Soroban storage tier they use or why. Contributors adding new keys had no
guidance, making it easy to accidentally use the wrong storage type.

Adds inline comments to each variant, a reference table in the contract
README, and a storage-type decision guide in CONTRIBUTING.md. No behaviour
changes.

Related issue

Testing done

Documentation-only change. No logic was modified.

Checklist

  • I have run cargo fmt (or equivalent formatter)
  • I have run cargo clippy (or equivalent linter)
  • All tests pass locally
  • I have labeled this PR with 'good first issue' or 'dx' where applicable.

Closes #245

Fixes Austinaminu2#245. DataKey variants were undocumented, making it unclear which
storage tier (instance vs persistent) each key uses and why.

Changes:
- Add inline comments to each DataKey variant in forge-stream explaining
  the storage type used and the rationale
- Add a Storage Strategy section to contracts/forge-stream/README.md with
  a reference table and a checklist for contributors adding new keys
- Add a Storage Type Selection subsection to CONTRIBUTING.md with a
  three-tier decision table and a pointer to forge-stream as an example

No behaviour changes.
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@zeekman Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Austinaminu2 Austinaminu2 merged commit 3aff85f into Austinaminu2:main Mar 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

forge-stream DataKey enum mixes instance and persistent storage usage — document which keys use which storage type

2 participants